package cn.edu.swufe.surverpark.struts2.service;

import java.util.List;

import cn.edu.swufe.surverpark.model.Answer;
import cn.edu.swufe.surverpark.model.Page;
import cn.edu.swufe.surverpark.model.Question;
import cn.edu.swufe.surverpark.model.Survey;
import cn.edu.swufe.surverpark.model.User;

/**
 *@author 陈龙 E-mail:529914446@qq.com
 *@version创建时间:2015年4月29日下午11:40:18
 *类说明
 */
public interface SurveyService {
	/**
	 * 查询调查列表
	 * @param user
	 * @return
	 */
	public List<Survey> findMySurveys(User user);

	public Survey newSurvey(User user);

	public Survey getSurvey(Integer sid);

	public Survey getSurveyWithChildren(Integer sid);

	public void updateSurvey(Survey model);

	public void saveOrUpdatePage(Page model);

	public Page getPage(Integer pid);

	public void saveOrUpdateQuestion(Question model);

	public void deleteQuestion(Integer qid);

	public void deletePage(Integer pid);

	public void deleteSurvey(Integer sid);

	public Question getQuestion(Integer qid);

	public void clearAnswers(Integer sid);

	public void toggleStatus(Integer sid);

	public void updateLogoPhotoPath(Integer sid, String path);
	
	public void moveOrCopyPage(Integer srcPid, Integer targPid, int pos);

	public List<Survey> getSurveyWithPages(User user);

	public List<Survey> findAllAvailableSurveys();

	public Page getFirstPage(Integer sid);

	public Page getPrePage(Integer currPid);

	public Page getNextPage(Integer currPid);

	public void saveAnswers(List<Answer> processAnswers);

	public List<Question> getQuestions(Integer sid);

	public List<Answer> getAnswers(Integer sid);
		
}

